From fbbeac4db8685bd3cb3a92e6ca69d1c0ae71e38b Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Fri, 2 Dec 2005 11:08:24 +0100 Subject: [PATCH] While working bug #143, it came to my attention that no verbose error is loged if the dom0 kernel mangles a packet and tries to checksum offload it. This should let the user know what is going wrong (instead of silently dropping the packet). Signed-off-by: Jon Mason --- linux-2.6-xen-sparse/net/core/dev.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/linux-2.6-xen-sparse/net/core/dev.c b/linux-2.6-xen-sparse/net/core/dev.c index 8c73647ecb..5c59e4ca79 100644 --- a/linux-2.6-xen-sparse/net/core/dev.c +++ b/linux-2.6-xen-sparse/net/core/dev.c @@ -1283,6 +1283,11 @@ int dev_queue_xmit(struct sk_buff *skb) skb->csum = offsetof(struct udphdr, check); break; default: + if (net_ratelimit()) + printk(KERN_ERR "Attempting to checksum a non-" + "TCP/UDP packet, dropping a protocol" + " %d packet", skb->nh.iph->protocol); + rc = -EPROTO; goto out_kfree_skb; } if ((skb->h.raw + skb->csum + 2) > skb->tail) -- 2.30.2